package com.cuiyun97.context;

import java.util.Map;

/**
 * 处理共享变量,
 *
 * 比如登录人id
 * 这里包含了后台管理, 前端
 */
public class BaseContext {

    public static ThreadLocal<Map<String, Integer>> threadLocal = new ThreadLocal<>();

    public static void set(Map<String, Integer> object) {
        threadLocal.set(object);
    }

    public static Map<String, Integer> get() {
        return threadLocal.get();
    }

    public static void remove() {
        threadLocal.remove();
    }
}
